<?php
/**
 * User: lie
 * Date: 2020-11-07 22:09
 * description:
 */
require_once('conn.php');
    $sq = "SELECT * FROM tb_shop";
    $result = $mysqli->query($sq);
?>
    <table>
<?php
        while ($row = $result->fetch_row()){
?>
        <tr>
            <td>商品编码: <?php echo $row[0];?><hr></td>
            <td>商品名称: <?php echo $row[1];?><hr></td>
        </tr>
        <tr>
            <td>购买数量: <?php echo $row[2];?><hr></td>
            <td>金额总计: <?php echo $row[3];?><hr></td>
        </tr>
        <tr>
            <td>商品运费: <?php echo $row[4];?><hr></td>
            <td>其他声明: <?php echo $row[5];?><hr></td>

<?php
        }
?>
        </tr>
    </table>
<?php
    if ($_POST['sub4']){
        echo "<script>window.location.href='index.php'</script>";
    }
?>
